home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // example of use with ANI.AWK to create a 20 segment "slinky"
- // which slinks along a checkered floor
- //
- #include "shapes.inc"
- #include "colors.inc"
- #include "textures.inc"
- #include "slink.inc"
-
- #declare segment_texture = texture {
- color Red
- reflection 0
- }
- #declare segment= intersection {
- intersection { Disk_Y
- scale <10.0 1.0 10>
- }
-
- quadric { Cylinder_Y
- scale <9.0 1.0 9.0>
- inverse
- }
- }
-
- /* Put a VIEW_POINT here... */
-
- camera {
- location <xeye 30.0 -100>
- up <0.0 1.0 0.0>
- right <1.333 0.0 0.0>
- look_at <xeye 30.0 0.0>
- }
-
- object {
- light_source {< xeye 80 -180 >
- colour White
- }
- }
-
- object { /* floor */
- plane { <0.0 1.0 0.0> 0.0 }
-
- texture {
- checker color Black color White
- reflection 0
- }
- scale <20 1 20>
- translate <0 -.5 0>
- }
-
- object {
- plane { <0.0 0.0 1.0> 0.0 }
-
- texture {
- color White
- reflection 0.2
- scale <15.0 15.0 15.0>
- }
- translate <0.0 0.0 80.0>
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r1 >
- translate < x1 y1 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r2 >
- translate < x2 y2 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r3 >
- translate < x3 y3 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r4 >
- translate < x4 y4 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r5 >
- translate < x5 y5 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r6 >
- translate < x6 y6 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r7 >
- translate < x7 y7 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r8 >
- translate < x8 y8 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r9 >
- translate < x9 y9 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r10 >
- translate < x10 y10 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r11 >
- translate < x11 y11 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r12 >
- translate < x12 y12 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r13 >
- translate < x13 y13 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r14 >
- translate < x14 y14 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r15 >
- translate < x15 y15 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r16 >
- translate < x16 y16 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r17 >
- translate < x17 y17 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r18 >
- translate < x18 y18 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r19 >
- translate < x19 y19 0 >
- }
-
- object { intersection {segment}
- texture {
- segment_texture
- }
- rotate < 0 0 r20 >
- translate < x20 y20 0 >
- }
-
-